/**
 * @Authther: mrwu
 * @date:2021/3/4-03
 * @Description:PACKAGE_NAME
 */
public class Test {
    public static void main(String[] args) {
        pringtClassInfo("".getClass());
        pringtClassInfo(Runnable.class);
        pringtClassInfo(String[].class);
        pringtClassInfo(int.class);
    }

    static void  pringtClassInfo(Class cls){
        System.out.println("Class name:"+cls.getName());
        System.out.println("simple name:"+cls.getSimpleName());
        if (cls.getPackage()!=null){
            System.out.println("packege name:"+ cls.getPackage().getName());
        }
        System.out.println("is interface:"+cls.isInterface());
        System.out.println("is enum:"+cls.isEnum());
        System.out.println("is array"+cls.isArray());
        System.out.println("is primitive: " + cls.isPrimitive());
    }

}

